import java.util.Scanner;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/6/5
 * Time:19:27
 **/
public class Main1 {
    /**
     * 每日一题-有假币
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int n = sc.nextInt();
            if(n==0) break;
            int count = 0;
            while(n>=2) {
                //称重
                n = (int) Math.ceil((double)n/3);//小数位向上取整
                count ++;
            }
            System.out.println(count);
        }
    }
}
